{% extends 'teacher-base.html' %}
{% block title %}个人信息{% endblock %}

{% block custom_bread %}
    <section>      <div class="wp">
            <ul  class="crumbs">
                <li><a href="{% url 'index' %}">首页</a>></li>
                <li><a href="{% url 'teacher:teacher_info' %}">个人中心</a>></li>
                <li>个人信息</li>
            </ul>
        </div>

    </section>
{% endblock %}

{% block right_content %}
    <div class="right">
		<div class="personal_des ">
			<div class="head" style="border:1px solid #eaeaea;">
				<h1>个人信息</h1>
			</div>
			<div class="inforcon">
				<div class="left" style="width:242px;">
                    <iframe id='frameFile' name='frameFile' style='display: none;'></iframe>
                    <form class="clearfix" id="jsAvatarForm" enctype="multipart/form-data" autocomplete="off" method="post" action="{% url 'users:image_upload' %}" target='frameFile'>
                        <label class="changearea" for="avatarUp">
                            <span id="avatardiv" class="pic">
                                <img width="100" height="100" class="js-img-show" id="avatarShow" src="/media/{{ request.user.image }}"/>
                            </span>
                            <span class="fl upload-inp-box" style="margin-left:70px;">
                                <span class="button btn-green btn-w100" id="jsAvatarBtn">修改头像</span>
                                <input type="file" name="image" id="avatarUp" class="js-img-up"/>
                            </span>
                        </label>
                        {% csrf_token %}
                    </form>

				</div>
				<form class="perinform" id="jsEditUserForm" autocomplete="off">
					<ul class="right">
						<li>昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：
                           <input type="text" name="username" id="username" value="{{ request.user.username }}" maxlength="10">
                            <i class="error-tips"></i>
                        </li>
						<li>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日：
                           <input type="text" id="end_time" name="end_time" value="{{ request.user.birthday|default_if_none:''|date:'yy-m-d'}}" readonly="readonly"/>
                            <i class="error-tips"></i>
						</li>
						<li>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
							<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio"  name="sex" value="male" {% if request.user.sex == 'male' %}checked="checked"{% endif %}>男</label>
							<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="female" {% if request.user.sex == 'female' %}checked="checked"{% endif %}>女</label>
						</li>
						<li class="p_infor_city">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：
                            <input type="text" name="address" id="address" placeholder="请输入你的地址" value="{{ request.user.address }}" maxlength="30">
						    <i class="error-tips"></i>
                        </li>
						<li>手&nbsp;&nbsp;机&nbsp;&nbsp;号：
                            <input type="text" name="mobile" id="mobile" placeholder="请输入你的手机号码" value="{{ request.user.mobile|default_if_none:'' }}" maxlength="11">
                        </li>
                        <li style="height: 85px">个人简介：
                            <input type="text" name="detail" id="detail" placeholder="请介绍自己" value="{{ tea_obj.detail |default_if_none:''}}"  style="width: 302px ;height: 80px">
                        </li>
						<li class="button heibtn">
							<input type="button" id="jsEdit" value="保存">
						</li>
					</ul>
                    {% csrf_token %}
				</form>
			</div>
		</div>
	</div>
{% endblock %}


